package me.shuzu.demo.text1;

import java.util.Random;

public class Demo4 {
    public static void main(String[] args) {
        int a[]={1,2,3,4,5};
        int temp;
        Random r=new Random();
        for (int i = 0; i < a.length; i++) {
            int number=r.nextInt(a.length);
            temp=a[number];
            a[number]=a[i];
            a[i]=temp;
        }
        for (int i = 0; i < a.length; i++) {
            System.out.println(a[i]);
        }
    }
}
